package com.axc.gallery2.view;

import android.content.Context;

import com.axc.gallery2.dbhelper.AlbumDBHelper;
import com.axc.gallery2.dbhelper.AlbumInfo;

public class ImageAdapterFactory {


	
	public static ImageAdapter createImageAdapter(Context context,int albumId){
		AlbumDBHelper albumDBHelper = new AlbumDBHelper(context);
		switch (albumId) {
		case AlbumInfo.LOCALALBUMID:
			return new GridViewAdapter(context,albumDBHelper.getAlbum(albumId).getAlbumItems());	

		case AlbumInfo.NETALBUMID:
		//	return new GridViewAdapter(context, ImageAdapter.getPictures(Environment.getDataDirectory().getPath()));		
		default:
			return new GridViewAdapter(context, albumDBHelper.getImages(albumId));
		}
	}
}
